Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

puppeteer-extra-plugin-anonymize-ua

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

puppeteer-extra-plugin-anonymize-ua

Anonymize User-Agent in puppeteer.

  • 2.4.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5K
decreased by-14.16%
Maintainers
1
Weekly downloads
 
Created
Source

puppeteer-extra-plugin-anonymize-ua

A plugin for puppeteer-extra.

Install

yarn add puppeteer-extra-plugin-anonymize-ua

API

Table of Contents
  • Plugin

Plugin

Extends: PuppeteerExtraPlugin

Anonymize the User-Agent on all pages.

Supports dynamic replacing, so the Chrome version stays intact and recent.

Type: function (opts)

  • opts Object Options (optional, default {})
    • opts.stripHeadless boolean Replace HeadlessChrome with Chrome. (optional, default true)
    • opts.makeWindows boolean Sets the platform to Windows 10, 64bit (most common). (optional, default true)
    • opts.customFn Function A custom UA replacer function. (optional, default null)

Example:

const puppeteer = require('puppeteer-extra')
puppeteer.use(require('puppeteer-extra-plugin-anonymize-ua')())
// or
puppeteer.use(require('puppeteer-extra-plugin-anonymize-ua')({
  customFn: (ua) => 'MyCoolAgent/' + ua.replace('Chrome', 'Beer')})
)
const browser = await puppeteer.launch()

Keywords

FAQs

Package last updated on 01 Mar 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc